import config from "@/config"
import http from "@/utils/request"

export default {
	systemConfig: {
		url: `${config.API_URL}/v2/sys-config/getsystemconfig`,
		name: "获取系统配置",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	systemConfigUpdate:{
		url: `${config.API_URL}/v2/sys-config/updatesystemconfig`,
		name: "更改系统配置",
		post: async function(data={}){
			console.log(config.API_URL)
			return await http.post(this.url, data);
		}
	},
    mailConfig: {
		url: `${config.API_URL}/v2/sys-config/getmailconfig`,
		name: "获取邮件配置",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
    mailConfigUpdate:{
        url: `${config.API_URL}/v2/sys-config/updatemailconfig`,
		name: "更改邮件配置",
		post: async function(data={}){
			console.log(config.API_URL)
			return await http.post(this.url, data);
		}
    },
    extConfig:{
        url: `${config.API_URL}/v2/sys-config/getextconfig`,
        name: "获取拓展配置",
        get: async function(data={}){
			return await http.get(this.url, data);
		}
    },
    saveorupdate:{
        url: `${config.API_URL}/v2/sys-config/saveorupdate`,
        name: "保存/更新配置",
        post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    deleteConfig:{
        url: `${config.API_URL}/v2/sys-config/delete`,
        name: "删除配置",
        post: async function(data={}){
			return await http.post(this.url, data);
		}
    }
}
